#
# profile.py - defines a users profile data model for the datastore
#
# Copyright 2008-2009 Autelic Association (http://www.autelic.org)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from google.appengine.ext import db
import os
from google.appengine.api import users

class SharedAlbum(db.Model):
#  source = db.StringProperty(choices="PicasaWeb, RSS, URL")
  source = db.StringProperty()
  user_id = db.StringProperty()
  album_id = db.StringProperty()
  album_name = db.StringProperty()
  auth_key = db.StringProperty()
  full_url = db.StringProperty()

class Profile(db.Model):
  user = db.UserProperty(required=True)
  dateCreated = db.DateTimeProperty(auto_now_add=True)
  photo = db.BlobProperty()
  complete = db.BooleanProperty(required=True, default = False)
  first_name = db.StringProperty()
  last_name = db.StringProperty()
  tutors = db.ListProperty(db.Key)  #list of references to other users
  tutored = db.ListProperty(db.Key)  #list of references to other users
  shared_albums = db.ListProperty(db.Key) #list of SharedAlbums
